package cn.com.server.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.github.pagehelper.Page;

import cn.com.server.entity.Role;
import cn.com.server.extend.model.RoleModel;
import cn.com.server.extend.view.RoleView;

/**
 * <p>
  * 角色表 Mapper 接口
 * </p>
 *
 * @author qing
 * @since 2017-11-20
 */
public interface RoleDao{
	
	public List<Role> selectByUserId(@Param("userId")Long id);
	
	public List<Role> selectByGroupId(@Param("groupId") Long groupId);
	
	public Page<RoleView> selectRoleViewList(RoleModel model);
	
	public int insert(Role entity);
	
	public int update(Role entity);
	
	public int updateByRoleId(@Param("roleId") Long roleId);
	
	public int deleteRoleAndAllByRoleId(@Param("roleId") Long roleId);

}